package com.chang.tx.controller;

import com.chang.tx.service.BookService;
import com.chang.tx.service.CheckoutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;

@Controller
public class BookController {
    /*@Autowired
    private BookService bookService;*/

    // 买书 图书id何用户id
    /*public void buyBook(Integer bookId, Integer userId) {
        bookService.buyBook(bookId, userId);
    }*/

    @Autowired
    private CheckoutService checkoutService;

    public void checkout(Integer[] bookIds, Integer userId) {
        checkoutService.checkout(bookIds, userId);
    }
}
